package com.yhj.servlet.container;

/**
 * 自定义的Servlet接口，可以用回调来控制生命周期
 * @author Administrator
 *
 */
public interface Servlet {
	/**
	 * init方法
	 */
	public void init();
	
	/**
	 * Service方法，判断method为Get或者为POST，再对应调用
	 * @param response
	 * @param request
	 */
	public void service(	ServletResponse response,ServletRequest request 	);
	/**
	 * GET方式调用doGet
	 * @param response
	 * @param request
	 */
	public void doGet(	ServletResponse response,ServletRequest request 	);
	/**
	 * POST方式采用doPost
	 * @param response
	 * @param request
	 */
	public void doPost(	ServletResponse response,ServletRequest request 	);
}
